<?php
/* @var $this BukutamuController */
/* @var $model Bukutamu */
/* @var $form CActiveForm */
?>


<div class="judul2" style="padding:3px 15px">
			TANYA JAWAB
</div>
<div style="background: #dedede repeat;"> 
<div style="width: 540px; padding:10px">
<?php if(Yii::app()->user->hasFlash('bukutamu')): ?>

<div class="flash-success">
    <?php echo Yii::app()->user->getFlash('bukutamu'); ?>
</div>
<?else :?>

<div class="form">

<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'bukutamu-form',
	'enableAjaxValidation'=>false,
)); ?>

	<p class="note">Isian bertanda <span class="required">*</span> wajib diisi.</p>

	<?php echo $form->errorSummary($model); ?>




<table border="0" cellpadding="0" cellspacing="0" id="id-form">
    
         <tr>
            <th valign="top" class="label" align="left"><?php echo $form->labelEx($model,'nama'); ?></th>
            <td class="label">
               	<?php echo $form->textField($model,'nama',array('size'=>60,'maxlength'=>255)); ?>
            </td>
            <td class="label">
                <?//php if ($model->hasErrors('nama')) echo "<div class='error-left'></div>"; ?>
                <?//php echo $form->error($model, 'nama', array('class' => 'error-inner')); ?>
            </td>
        </tr>
        
                <tr>
            <th valign="top" class="label" align="left"><?php echo $form->labelEx($model,'email'); ?></th>
            <td class="label">
               	<?php echo $form->textField($model,'email',array('size'=>60,'maxlength'=>255)); ?>
            </td>
            <td class="label">
                <?//php if ($model->hasErrors('email')) echo "<div class='error-left'></div>"; ?>
                <?//php echo $form->error($model, 'email', array('class' => 'error-inner')); ?>
            </td>
        </tr>
        
    
           <tr>
            <th valign="top" class="label" align="left">	<?php echo $form->labelEx($model,'alamat'); ?></th>
            <td class="label">
              <?php echo $form->textArea($model,'alamat',array('rows'=>2, 'cols'=>50));?>
            </td>
            <td class="label">
                <?//php if ($model->hasErrors('alamat')) echo "<div class='error-left'></div>"; ?>
                <?//php echo $form->error($model, 'alamat', array('class' => 'error-inner')); ?>
            </td>
        </tr>
         <tr>
            <th valign="top" class="label" align="left">	<?php echo $form->labelEx($model,'isi'); ?></th>
            <td class="label">
              <?php echo $form->textArea($model,'isi',array('rows'=>6, 'cols'=>50));?>
            </td>
            <td class="label">
                <?//php if ($model->hasErrors('isi')) echo "<div class='error-left'></div>"; ?>
                <?//php echo $form->error($model, 'isi', array('class' => 'error-inner')); ?>
            </td>
        </tr>
               	<?php if(CCaptcha::checkRequirements()): ?>
		<tr>
        
			<td valign="top" class="label" align="left"><div class="label">	<?php echo $form->labelEx($model,'verifyCode'); ?></div></td>        
			<td class="label"><?php $this->widget('CCaptcha'); ?>
            <td class="label"><div class="label"></div></td>
		</td>
        	
		</tr>
        
		<tr>
			<td valign="top" class="label" align="left"><div class="label"><b></b></div></td>
            <td class="label"><?php echo $form->textField($model,'verifyCode'); ?></td>
            <td class="label"><div class="label"></div></td>
		</tr>
        

        
        	<?php endif; ?>
      <tr>
            <th>&nbsp;</th>
            <td valign="top" class="label">
               <?php echo CHtml::submitButton('Submit'); ?>
            </td>
            <td class="label"></td>
        </tr>
</table>





	<!--<div class="row">
		<?//php echo $form->labelEx($model,'nama'); ?>
		<?//php echo $form->textField($model,'nama',array('size'=>60,'maxlength'=>225)); ?>
		<?//php echo $form->error($model,'nama'); ?>
	</div>

	<div class="row">
		<?//php echo $form->labelEx($model,'email'); ?>
		<?//php echo $form->textField($model,'email',array('size'=>60,'maxlength'=>225)); ?>
		<?//php echo $form->error($model,'email'); ?>
	</div>

	<div class="row">
		<?//php echo $form->labelEx($model,'alamat'); ?>
		<?//php echo $form->textField($model,'alamat',array('size'=>50,'maxlength'=>50)); ?>
		<?//php echo $form->error($model,'alamat'); ?>
	</div>

	<div class="row">
		<?//php echo $form->labelEx($model,'isi'); ?>
		<?//php echo $form->textArea($model,'isi',array('rows'=>6, 'cols'=>50)); ?>
		<?//php echo $form->error($model,'isi'); ?>
	</div>

	<div class="row">
		<?//php echo $form->labelEx($model,'jawaban'); ?>
		<?//php echo $form->textArea($model,'jawaban',array('rows'=>6, 'cols'=>50)); ?>
		<?//php echo $form->error($model,'jawaban'); ?>
	</div>

	<div class="row">
		<?//php echo $form->labelEx($model,'tgl_create'); ?>
		<?//php echo $form->textField($model,'tgl_create'); ?>
		<?//php echo $form->error($model,'tgl_create'); ?>
	</div>

	<div class="row">
		<?//php echo $form->labelEx($model,'status'); ?>
		<?//php echo $form->textField($model,'status',array('size'=>1,'maxlength'=>1)); ?>
		<?//php echo $form->error($model,'status'); ?>
	</div>

	<div class="row">
		<?//php echo $form->labelEx($model,'ip_guest'); ?>
		<?//php echo $form->textField($model,'ip_guest',array('size'=>40,'maxlength'=>40)); ?>
		<?//php echo $form->error($model,'ip_guest'); ?>
	</div>

	<div class="row buttons">
		<?//php echo CHtml::submitButton($model->isNewRecord ? 'Create' : 'Save'); ?>
	</div>-->

<?php $this->endWidget(); ?>

</div><!-- form -->

<?php endif; ?>


 <table border="0" cellpadding="5" cellspacing="1" width="100%" style="padding-left:0px;">
<tr  style="background:#888">
  <td valign="top" align="left" class="judul1" style="padding: 5px;">Daftar Tanya Jawab</td>
</tr>
<?php foreach($listbukutamu as $modelib): ?>    
                  
            <div style="position: relative;padding-top: 10px;"><?
                     
                 $isi1='';   
                
                $tgl=sql2date($modelib['tgl_create'],'d MMMM yyyy');
                $jawab='';
                if($modelib['jawaban']<>null) 
                $jawab='<div style="background:#f1f9fd;padding:5px;"><span >Admin :</span><br/>'.$modelib['jawaban'].'</div>';
			    else $jawab="";
			    $isi1 .=
				'<tr style="background:#eee;padding: 5px;">'.
				'<td valign="top" align="left" class="judul_news" style="padding: 5px;"><b>'.Ucwords($modelib['nama']).'</b><br/><span style="color:#014283;font-size:10px">'.$tgl.'</span><br/><span style="color:#014283;font-size:10px">'.$modelib['email'].'</span><br/>'.$modelib['isi'].'<br/>'.$jawab.'</td>'.
				'</tr>';
                
                echo $isi1;
                ?>



                </div>
            
             
        
              <?php endforeach; ?>
              </table>
    <div style="position:relative;">
        <?php $this->widget('CLinkPager', array(
        'pages' => $pages,
        'cssFile'=>bu().'/css/pager.css',
    )) ?>
    </div>
    


</div>
</div>